package edu.hwadee.BEIS.entity;
// default package

import java.sql.Timestamp;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import org.hibernate.annotations.GenericGenerator;

/**
 * TeachPlanBasicSituation entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "teachplan_basic_situation", catalog = "beis")

public class TeachPlanBasicSituation implements java.io.Serializable {

	// Fields

	private Integer teachPlanBasicSituationId;
	private SchoolBasicInfor schoolBasic;
	private String majorTeachingPlanFile;
	private String teachingPlanScheduleFile;
	private String reviseCourseFile;
	private String theoreticalCourse;
	private String trainingCourse;
	private String outsideTrainingbaseName;
	private Short countyAuditStatus;
	private Short cityAuditStatus;
	private Timestamp modifyTime;
	private Set<TrainingRoom> trainingRooms = new HashSet<TrainingRoom>(0);

	// Constructors

	/** default constructor */
	public TeachPlanBasicSituation() {
	}

	/** minimal constructor */
	public TeachPlanBasicSituation(SchoolBasicInfor schoolBasic, String majorTeachingPlanFile,
			String teachingPlanScheduleFile, String reviseCourseFile, String theoreticalCourse, String trainingCourse,
			String outsideTrainingbaseName, Short countyAuditStatus, Short cityAuditStatus, Timestamp modifyTime) {
		this.schoolBasic = schoolBasic;
		this.majorTeachingPlanFile = majorTeachingPlanFile;
		this.teachingPlanScheduleFile = teachingPlanScheduleFile;
		this.reviseCourseFile = reviseCourseFile;
		this.theoreticalCourse = theoreticalCourse;
		this.trainingCourse = trainingCourse;
		this.outsideTrainingbaseName = outsideTrainingbaseName;
		this.countyAuditStatus = countyAuditStatus;
		this.cityAuditStatus = cityAuditStatus;
		this.modifyTime = modifyTime;
	}

	/** full constructor */
	public TeachPlanBasicSituation(SchoolBasicInfor schoolBasic, String majorTeachingPlanFile,
			String teachingPlanScheduleFile, String reviseCourseFile, String theoreticalCourse, String trainingCourse,
			String outsideTrainingbaseName, Short countyAuditStatus, Short cityAuditStatus, Timestamp modifyTime,
			Set<TrainingRoom> trainingRooms) {
		this.schoolBasic = schoolBasic;
		this.majorTeachingPlanFile = majorTeachingPlanFile;
		this.teachingPlanScheduleFile = teachingPlanScheduleFile;
		this.reviseCourseFile = reviseCourseFile;
		this.theoreticalCourse = theoreticalCourse;
		this.trainingCourse = trainingCourse;
		this.outsideTrainingbaseName = outsideTrainingbaseName;
		this.countyAuditStatus = countyAuditStatus;
		this.cityAuditStatus = cityAuditStatus;
		this.modifyTime = modifyTime;
		this.trainingRooms = trainingRooms;
	}

	// Property accessors
	@GenericGenerator(name = "generator", strategy = "increment")
	@Id
	@GeneratedValue(generator = "generator")

	@Column(name = "teachPlan_basic_situation_id", unique = true, nullable = false)

	public Integer getTeachPlanBasicSituationId() {
		return this.teachPlanBasicSituationId;
	}

	public void setTeachPlanBasicSituationId(Integer teachPlanBasicSituationId) {
		this.teachPlanBasicSituationId = teachPlanBasicSituationId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "school_id", nullable = false)

	public SchoolBasicInfor getSchoolBasic() {
		return this.schoolBasic;
	}

	public void setSchoolBasic(SchoolBasicInfor schoolBasic) {
		this.schoolBasic = schoolBasic;
	}

	@Column(name = "major_teaching_plan_file", nullable = false, length = 100)

	public String getMajorTeachingPlanFile() {
		return this.majorTeachingPlanFile;
	}

	public void setMajorTeachingPlanFile(String majorTeachingPlanFile) {
		this.majorTeachingPlanFile = majorTeachingPlanFile;
	}

	@Column(name = "teaching_plan_schedule_file", nullable = false, length = 100)

	public String getTeachingPlanScheduleFile() {
		return this.teachingPlanScheduleFile;
	}

	public void setTeachingPlanScheduleFile(String teachingPlanScheduleFile) {
		this.teachingPlanScheduleFile = teachingPlanScheduleFile;
	}

	@Column(name = "revise_course_file", nullable = false, length = 100)

	public String getReviseCourseFile() {
		return this.reviseCourseFile;
	}

	public void setReviseCourseFile(String reviseCourseFile) {
		this.reviseCourseFile = reviseCourseFile;
	}

	@Column(name = "theoretical_course", nullable = false, length = 50)

	public String getTheoreticalCourse() {
		return this.theoreticalCourse;
	}

	public void setTheoreticalCourse(String theoreticalCourse) {
		this.theoreticalCourse = theoreticalCourse;
	}

	@Column(name = "training_course", nullable = false, length = 50)

	public String getTrainingCourse() {
		return this.trainingCourse;
	}

	public void setTrainingCourse(String trainingCourse) {
		this.trainingCourse = trainingCourse;
	}

	@Column(name = "outside_trainingbase_name", nullable = false, length = 50)

	public String getOutsideTrainingbaseName() {
		return this.outsideTrainingbaseName;
	}

	public void setOutsideTrainingbaseName(String outsideTrainingbaseName) {
		this.outsideTrainingbaseName = outsideTrainingbaseName;
	}

	@Column(name = "county_auditstatus", nullable = false)

	public Short getCountyAuditStatus() {
		return this.countyAuditStatus;
	}

	public void setCountyAuditStatus(Short countyAuditStatus) {
		this.countyAuditStatus = countyAuditStatus;
	}

	@Column(name = "city_auditstatus", nullable = false)

	public Short getCityAuditStatus() {
		return this.cityAuditStatus;
	}

	public void setCityAuditStatus(Short cityAuditStatus) {
		this.cityAuditStatus = cityAuditStatus;
	}

	@Column(name = "modify_time", nullable = false, length = 19)

	public Timestamp getModifyTime() {
		return this.modifyTime;
	}

	public void setModifyTime(Timestamp modifyTime) {
		this.modifyTime = modifyTime;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "teachPlanBasicSituation")

	public Set<TrainingRoom> getTrainingRooms() {
		return this.trainingRooms;
	}

	public void setTrainingRooms(Set<TrainingRoom> trainingRooms) {
		this.trainingRooms = trainingRooms;
	}

}